<?php
/* @var $this AnswerController */
/* @var $model Answer */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'answer-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
	
	<div class="control-group">
	   <?php echo $form->labelEx($model,'issueID',array('class'=>'control-label')); ?>	 
	   <?php echo $form->textField($model,'issueID',array('autocomplete'=>'off','readonly'=>true)); ?>       
 	</div>
 	
 	<div class="control-group">
	   <?php echo $form->labelEx($model,'thread_number',array('class'=>'control-label')); ?>	 
	   <?php echo $form->textField($model,'thread_number',array('autocomplete'=>'off','readonly'=>true)); ?>       
 	</div> 	
	
	<div class="control-group">
	   <?php echo $form->labelEx($model,'resolver',array('class'=>'control-label')); ?>	 
	   <?php echo $form->textField($model,'resolver',array('autocomplete'=>'off','readonly'=>true)); ?>       
 	</div> 
 	
  <div class="control-group">
	    	<?php echo $form->labelEx($model,'resolve_status',array('class'=>'control-label')); ?>
		    <?php echo $form->dropdownList($model,'resolve_status',$model->getResolving(),array('prompt'=>'Chọn resolve','required'=>'required'))?>
	</div>
	<div class="control-group">
      	<?php echo $form->labelEx($model,'content',array('class'=>'control-label')); ?>
      	<?php //echo $form->textArea($model,'content',array('id'=>'editor')); ?>
      	<div class="clearfix"></div>
      	<?php
      		$this->widget('ext.ckeditor.CKEditorWidget',array(
            "model"=>$model,
            "attribute"=>'content',
          	"config" => array(
      	      "toolbar"=>"Full",
      				"height"=>"400px",
      				'width'=>"95%",
      				//'contentsCss'=>Yii::app()->baseUrl.'/themes/admin/views/css/form.css',
      				//'bodyClass'=>'ckeditor'
          ),
          )); 
      	?>
	   	</div>
	   	
		 <div class="control-group">
			   <?php echo $form->labelEx($model,'comment',array('class'=>'control-label')); ?>
		     <?php echo $form->textArea($model,'comment',array('rows'=>6, 'cols'=>50,'autocomplete'=>'off','required'=>'required'))?>    
			</div>

	 	<div class="control-group">
	   <?php echo $form->labelEx($model,'createddate',array('class'=>'control-label')); ?>	 
	   <?php echo $form->textField($model,'createddate',array('autocomplete'=>'off','readonly'=>true)); ?>       
  	</div>  	
  
	  	
	  	<div class="control-group">
	  		<?php echo $form->labelEx($model,'image',array('class'=>'control-label')); ?>
	  		<?php $this->widget('CMultiFileUpload', array(
								'model'=>$model,// dong nay lam gi>
                'attribute' => 'image',
								'max'=>5,// gioi han so luong file?
                'accept' => 'jpeg|gif|png|jpg', // useful for verifying files
                'duplicate' => 'File bị trùng, vui lòng chọn lại!', // useful, i think
                'denied' => 'File không hợp lệ', // useful, i think
	  		        'remove'=>'<i class="icon-remove"></i>',
              ));
      ?>  
      <p class="note">Chấp nhận file: jpg, jpeg, gif, png</p>
  		</div>
	
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Tạo mới' : 'Cập nhật', array('class'=>'btn btn-success')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->